package org.posta.mail.server;

import java.util.TimeZone;

import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Stage;

public class Main
{
    
    @Inject
    Main(MailServer mailServer, ShutdownHandler handler)
    {
        Runtime.getRuntime().addShutdownHook(handler);
        mailServer.start();
    }
    
    public static void main(String[] args)
    {
        for ( String tz : TimeZone.getAvailableIDs() )
            System.out.println( tz );
        Injector injector = Guice.createInjector(Stage.DEVELOPMENT);
        injector.getInstance(Main.class);
    }
    
}
